-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow requesting money when expensify account owns workspace #30019
Conversation
Deploying with Cloudflare Pages
|
@narefyev91 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@narefyev91 I'm having trouble with my android emulator, so I haven't been able to get screenshots for that platform yet, but maybe you could still review while I figure that out? |
Got Android working! |
Reviewer Checklist
Screenshots/Videos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
🎀 👀 🎀 C+ reviewed
🎯 @narefyev91, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #30170. |
src/pages/home/report/ReportActionCompose/AttachmentPickerWithMenuItems.js
Outdated
Show resolved
Hide resolved
d6b13e2
to
481c5df
Compare
@grgia @narefyev91 mind giving it another review? |
@youssef-lr Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NAB
src/libs/ReportUtils.js
Outdated
* @param {Object} report | ||
* @returns {Boolean} | ||
*/ | ||
function doExpensifyAccountsOwnPolicy(report) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NAB but I feel like this is slightly clearer (at least to me :D)
function doExpensifyAccountsOwnPolicy(report) { | |
function isPolicyOwnedByExpensifyAccounts(report) { |
Also, I think this might be better placed in actions/Policy.js
(the file already contains similar helper functions) and can just take a policyID
, we already have allPolicies
in that file as well. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A cleanup idea for later is to remove those helper functions from actions/Policy.js
and into PolicyUtils
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good points. Though actually, I'm going to refactor the canCreateTaskInReport
function below, which means we'll no longer need this function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're using it here as well, or will you also refactor this bit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the only place it'll be used, so no need to be a separate function is my thinking. Do you agree? I updated the PR so you can see how I'm doing it now.
15bc73b
to
f35acb9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/grgia in version: 1.3.95-0 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.95-9 🚀
|
🚀 Deployed to staging by https://github.com/grgia in version: 1.3.96-0 🚀
|
*/ | ||
function canCreateTaskInReport(report) { | ||
const otherReportParticipants = _.without(lodashGet(report, 'participantAccountIDs', []), currentUserAccountID); | ||
const areExpensifyAccountsOnlyOtherParticipants = _.every(otherReportParticipants, (accountID) => _.contains(CONST.EXPENSIFY_ACCOUNT_IDS, accountID)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a heads up, i believe the logic here caused this deploy blocker because it does not account for creating a task within an existing task.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing that out! That's a good catch.
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.96-15 🚀
|
Details
Right now, we don't allow you to request money in any chat in which an Expensify account is a participant. However, there are certain workspaces that are owned by these accounts and members of those workspaces should be able to request money. I also made it possible to assign tasks in workspace chats if owned by expensify accounts.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/324780
Tests
Offline tests
Same tests as online
QA Steps
Let's have @heyjennahay QA this internally.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop